﻿@model IList<Romantics.Domain.Objects.Category>
@using Romantics
@{
    Romantics.Domain.Objects.Category selected = ViewBag.Category;
    var Controller = ((string)ViewContext.RouteData.Values["Controller"]);
}
<!-- Widget to display categories in sidebar -->
<div class="sidebar">
  @if (Model.Count > 0)
  {
    <h3>Категории</h3>
    <ul>
      @foreach (var category in Model)
      {
        <li>@Html.CategoryLink(category, Controller, selected)</li>
      }
    </ul>
  }
</div>
